package itsense.model;


import java.util.ArrayList;
import java.util.List;

import com.google.gwt.user.client.rpc.IsSerializable;




public class MemberDTO implements IsSerializable{

	public MemberDTO() {
	}	
	
	
	public MemberDTO(Member member){
		id = member.getId();
		login = member.getLogin();
		password = member.getPassword();
		firstName = member.getFirstName();
		lastName = member.getLastName();
		email= member.getEmail();
		this.roles = new ArrayList<Long>();
		for (Long roleId: member.getRoles()){
			this.roles.add(roleId);
		}
	}
	
	private Long id;
	private List<Long> roles;
	private String login;
	private String password;
	private String email;
	private String firstName;
	private String lastName;
	
	public List<Long> getRoles() {
		return roles;
	}
	
	public void setRoles(List<Long> roles) {
		this.roles = roles;
	}

	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	
		public String getLogin() {
		return login;
	}
	public void setLogin(String login) {
		this.login = login;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	public String getLastName() {
		return lastName;
	}
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}
}
